#include "../Prec.h"

CCBall::CCBall(void)
{
}


CCBall::~CCBall(void)
{
  if(mBall)
    delete mBall;
}


CCBall* CCBall::BallWithFile(char* filename,CCRect &rect)
{
  CCBall *pobBall = new CCBall();
  if (pobBall && pobBall->initWithFile(filename, rect))
  {
    pobBall->autorelease();
    return pobBall;
  }
  CC_SAFE_DELETE(pobBall);
  return NULL;
}

CCBall* CCBall::BallWithFile(char* filename)
{
  CCBall *pobBall = new CCBall();
  if (pobBall && pobBall->initWithFile(filename))
  {
    pobBall->autorelease();
    return pobBall;
  }
  CC_SAFE_DELETE(pobBall);
  return NULL;
}
